package list.heima.homework.work2;

public class Test {
    public static void main(String[] args) {
        Fu f = new Zi();
        f.eat();
        System.out.println(f.num);

        Zi z =  (Zi) f;
        System.out.println(z.num);
    }
}

class Fu{

    int num =110;
    public void eat(){
        System.out.println("父吃人");
    }
}

class Zi extends Fu{
    int num = 120;
    @Override
    public void eat() {
        System.out.println("子吃小孩");
    }

}
